<html lang="en">
<!--#include file="/include/head.html"-->
<body>
<!--#include file="/include/top.html"-->
<div class="container">
    <div class="content-wrap">
        <div class="content" id="articleList">

        </div>
    </div>
    <!--#include file="/include/right.html"-->
</div>
<!--#include file="/include/footer.html"-->
</body>
<script>
    loadArticlePage(1);

    function loadArticlePage(pageNumber) {
        var para = {
            pageNumber: pageNumber
        };
        loadPostServer("/api/article/getArticlePage", para, function (data) {
            var articleHtml = "";
            var list = data.list;
            for (var i = 0; i < list.length; i++) {
                articleHtml += '<article class="article">';
                articleHtml += '<a class="article-img"><img alt="' + list[i].articleTitle + '" src="/static/image/articleImg/' + list[i].articleImg + '"/></a>';
                articleHtml += '<header>';
                articleHtml += '<a class="article-label">' + list[i].articleTypeName + '<i></i></a>';
                articleHtml += '<a class="article-title" title="' + list[i].articleTitle + '" href="/article.html?id=' + list[i].id + '">' + list[i].articleTitle + '</a>';
                articleHtml += '</header>';
                articleHtml += '<p class="meta">';
                articleHtml += '<span class="time"><i class="fa fa-clock-o"></i>' + list[i].createDate + '</span>';
                articleHtml += '<span class="view"><i class="fa fa-eye"></i>阅读(' + list[i].articleViews + ')</span>';
                articleHtml += '<span class="comment" href="/article/article.html?id=' + list[i].id + '#respond"><i class="fa fa-comments-o"></i>评论(' + list[i].commentNum + ')</span>';
                articleHtml += '</p>';
                articleHtml += '<span class="note">' + list[i].articleContent + '</span>';
                articleHtml += '</article>'
            }
            $("#articleList").html(articleHtml);
        })
    }

    function nohtml(str){
        var reg = new RegExp
        re.IgnoreCase = true
        re.Global = True
        re.Pattern = "(\<.[^\<]*\>)"
        str = re.replace(str, " ")
        re.Pattern = "(\<\/[^\<]*\>)"
        str = re.replace(str, " ")
        nohtml = str
        set
        re = nothing
        end
    }
</script>
</html>